<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="umsroot.css">
<TITLE>
Available Tools and Libraries
</TITLE>
</HEAD>
<BODY >
<A HREF="umsroot083.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot085.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc206">15.1</A>&nbsp;&nbsp;Available Tools and Libraries</H2>

ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> provides a number of different tools and libraries to assist 
the programmer with program development:
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description">
<B>Document</B><DD CLASS="dd-description"> Tools for generating documentation from ECLiPSe
sources.
<A NAME="@default866"></A>
<DT CLASS="dt-description"><B>Lint</B><DD CLASS="dd-description"> Generates warning messages for dubious programming 
constructs and violation of naming conventions for an ECLiPSe source 
module or file.
<A NAME="@default867"></A>
<DT CLASS="dt-description"><B>Pretty_printer</B><DD CLASS="dd-description"> Tools for pretty-printing a file in 
different formats.
<A NAME="@default868"></A>
<DT CLASS="dt-description"><B>Xref</B><DD CLASS="dd-description"> Enables the analysis of an ECLiPSe source module or
file for the construction of a predicate call graph.
<A NAME="@default869"></A>
</DL>
In addition, ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> provides several tools that aid in the
understanding of a programs runtime behaviour:
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description">
<B>Coverage</B><DD CLASS="dd-description"> Records the frequency at which various parts of the
program are executed.
<DT CLASS="dt-description"><B>Debugger</B><DD CLASS="dd-description"> Provides a low level view of program
activity. Chapter&nbsp;<A HREF="umsroot074.html#chapdebug">14</A> presents a comprehensive 
look at debugging of ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> programs.
<DT CLASS="dt-description"><B>Display matrix</B><DD CLASS="dd-description"> Shows the values of given terms in a graphical
window. Chapter&nbsp;<A HREF="umsroot018.html#chaptkeclipse">4</A> discusses the use of this tool.
<DT CLASS="dt-description"><B>Mode Analyser</B><DD CLASS="dd-description"> Collects statistics about the invocation modes of
predicates within a running program in order to assist in the generation of
compiler invocation mode directives.
<DT CLASS="dt-description"><B>Port Profiler</B><DD CLASS="dd-description"> Collects statistics about the running program in terms
of box model port counters.
<DT CLASS="dt-description"><B>Timing Profiler</B><DD CLASS="dd-description"> Samples the running program at regular intervals to
give a statistical summary of where the execution time is spent.
<DT CLASS="dt-description"><B>Visualisation framework</B><DD CLASS="dd-description"> A graphical environment for the
visualisation of search and propagation in constraint programs.
The <EM>Visualisation Tools Manual</EM> discusses the use of this 
environment.
</DL>
This section focuses on the program development libraries and two 
complementary runtime analysis tools, the <EM>profiler</EM> and the
<EM>coverage</EM> library.
Throughout this chapter, the use of each of the tools is demonstrated 
on the following <B>n-queens</B> code:
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
:- module(queen).
:- export queen/2.

queen(Data, Out) :-
        qperm(Data, Out),
        safe(Out).

qperm([], []).
qperm([X|Y], [U|V]) :-
        qdelete(U, X, Y, Z),
        qperm(Z, V).

qdelete(A, A, L, L).
qdelete(X, A, [H|T], [A|R]) :-
        qdelete(X, H, T, R).

safe([]).
safe([N|L]) :-
        nodiag(L, N, 1),
        safe(L).

nodiag([], _, _).
nodiag([N|L], B, D) :-
        D =\= N - B,
        D =\= B - N,
        D1 is D + 1,
        nodiag(L, B, D1).
</PRE></BLOCKQUOTE>
<HR>
<A HREF="umsroot083.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot085.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
